\documentclass[twoside,fleqn,12pt,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{varioref}
\usepackage[pdftex]{graphicx}
\usepackage{setspace}
\usepackage{babel}
\usepackage{latexsym}
\usepackage{xspace}
\usepackage{color}
%\usepackage{espcrc2}

%\usepackage{algorithm}
%\usepackage{algorithmic}

%\usepackage{program}

\usepackage{listings}

\usepackage{tikz}
% Optional libraries
\usetikzlibrary{snakes,arrows}

\DeclareGraphicsExtensions{.pdf,.png,.jpg}

\newcommand{\us}{\,$\mu$s\xspace}

% add words to TeX's hyphenation exception list
\hyphenation{author another created financial paper re-commend-ed Post-Script}

\begin{document}

%%-----------------------------------------------------------------------------
\title{\textit{cuqu}: a C++ library for messaging between the CPU and the GPU}

\author{D.\ Rossetti$^{a}$\\
  {\small $^a$ Istituto Nazionale di Fisica Nucleare, Sezione Roma I} \\
  {\small Piazzale A. Moro 2, I-00186 Rome, Italy} \\
}

\maketitle
%%-----------------------------------------------------------------------------

\begin{abstract}

% the idea of the cuqu library
% messaging between a CPU thread and a GPU kernel
% implemented for NVidia CUDA
% Apache License 2.0

\end{abstract}

\section{Introduction}

\section{Implementation}

% the structure
% components: barrier, atomic

\section{Benchmarks}

% \begin {figure}
%   \begin{center}
%     \input{queue_mark/plot.tex}
%   \end{center}
% \end {figure}

% \begin {figure}
%   \begin{center}
%     \input{barrier_mark/plot.tex}
%   \end{center}
% \end {figure}

\begin{figure} [htbp] % t=top, b=bottom, h=here...
  \begin{center}
    %\leavevmode
    % \vspace*{-7mm}
    % \setlength\fboxsep{0pt}
    % \setlength\fboxrule{0.5pt}
    % \fbox{
    \includegraphics[width=\columnwidth,keepaspectratio]{queue_mark/plot.pdf}
    % }
    %   \vspace*{-10mm}
  \end{center}
  \caption{\small cuqu::queue fetch() benchmark.}
  \label{fig:queue_mark}
  %\vspace*{-5mm}
\end{figure}

\begin{figure} [htbp] % t=top, b=bottom, h=here...
  \begin{center}
    %\leavevmode
    % \vspace*{-7mm}
    % \setlength\fboxsep{0pt}
    % \setlength\fboxrule{0.5pt}
    % \fbox{
    \includegraphics[width=\columnwidth,keepaspectratio]{barrier_mark/plot.pdf}
    % }
    %   \vspace*{-10mm}
  \end{center}
  \caption{\small barrier wait benchmark.}
  \label{fig:barrier_mark}
  %\vspace*{-5mm}
\end{figure}

% \begin{algorithm}                      % enter the algorithm environment
%   \caption{Calculate $y = x^n$}          % give the algorithm a caption
%   \label{alg1}                           % and a label for \ref{} commands later in the document
%   \begin{algorithmic}[5]
%     \REQUIRE $n \geq 0 \vee x \neq 0$
%     \ENSURE $y = x^n$
%     \STATE $y \Leftarrow 1$
%     \IF{$n < 0$}
%     \STATE $X \Leftarrow 1 / x$
%     \STATE $N \Leftarrow -n$
%     \ELSE
%     \STATE $X \Leftarrow x$
%     \STATE $N \Leftarrow n$
%     \ENDIF
%     \WHILE{$N \neq 0$}
%     \IF{$N$ is even}
%     \STATE $X \Leftarrow X \times X$
%     \STATE $N \Leftarrow N / 2$
%     \ELSE[$N$ is odd]
%     \STATE $y \Leftarrow y \times X$
%     \STATE $N \Leftarrow N - 1$
%     \ENDIF
%     \ENDWHILE
%   \end{algorithmic}
% \end{algorithm}

% \begin{program}
%   \mbox{A fast exponentiation procedure:}
%   \BEGIN %
%   \FOR i:=1 \TO 10 \STEP 1 \DO
%   |expt|(2,i); \\ |newline|() \OD %
%   \rcomment{This text will be set flush to the right margin}
%   \WHERE
%   \PROC |expt|(x,n) \BODY
%   z:=1;
%   \IF n=0 \THEN \EXIT \FI;
%   \IF |odd|(n) \THEN \EXIT \FI;
%   \COMMENT{This is a comment statement};
%   n:=n/2; x:=x*x;
%   \{ n>0 \};
%   n:=n-1; z:=z*x;
%   |print|(z) \ENDPROC
%   \END
% \end{program}

% \definecolor{darkgray}{rgb}{0.95,0.95,0.95}
% \lstset{language=C++}
% \lstset{backgroundcolor=\color{darkgray}}
% \lstset{numbers=left, numberstyle=\tiny, stepnumber=2, numbersep=5pt}
% \lstset{keywordstyle=\color{red}\bfseries\emph}
% \begin{lstlisting}[frame=tb]
% for(i = 0; i < 10; i++)
% {
%     // increment the pointer
%     *p++ = i;
%     House h = new house();
%     int romms = h.getRooms():
% }
% \end{lstlisting}

% Also external files can be included:
% \usepackage{listings}
% \lstset{language=Java, backgroundcolor=\color{yellow}, basicstyle=\small, commentstyle=\color{green}}
% \lstset{linewidth=\textwidth, showstringspaces=false}
% \lstset{numbers=left, stepnumber=5, numbersep=10pt}
% \lstset{frame=trBL}
% \lstinputlisting[caption=Multi-Page Java Code,label=lst:java]{example.java}

% \lstset{language=C++}
% \begin{lstlisting}
% class A {
%   A() {}
%   ~A() {}
%   void print() { cout << ``I'm an A'' << endl; }
% };
% \end{lstlisting}

%\lstinputlisting[language=C++]{../cuqu/queue.h}

% \begin{tikzpicture}
% \draw (1,0) -- (0,1) -- (-1,0) -- (0,-1) -- cycle;
% \end{tikzpicture}

\section{Use cases}

\section{Benchmarks}

\lstlistoflistings

\end{document}
